home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_lrm / chapa.doc < prev    next >
Text File  |  1996-01-30  |  27KB  |  992 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. The following document is a draft  of  the  corresponding  chapter  of  the
  7. version  of  the  Ada  Reference  Manual  produced  in response to the Ansi
  8. Canvass.  It is given a limited circulation  to  Ada  implementers  and  to
  9. other groups contributing comments (according to the conventions defined in
  10. RRM.comments).  This draft should not be referred to in any publication.
  11.  
  12.  
  13.  
  14.                        ANSI-RM-A-v23 - Draft Chapter
  15.  
  16.                      A  Predefined Language Attributes
  17.                                 version 23
  18.  
  19.                                  83-02-11
  20.  
  21.  
  22. This revision has considered all comments up to #5795
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.                      A. Predefined Language Attributes
  78.  
  79.  
  80.  
  81. This  annex  summarizes  the  definitions given elsewhere of the predefined
  82. language attributes.
  83.  
  84.  
  85.  
  86. P'ADDRESS         For a prefix P that denotes an object, a program unit,  a
  87.                   label, or an entry:
  88.  
  89.                   Yields  the  address  of  the  first of the storage units
  90.                   allocated to P.  For a subprogram, package, task unit, or
  91.                   label, this value refers to the machine  code  associated
  92.                   with  the  corresponding body or statement.  For an entry
  93.                   for which an address clause has  been  given,  the  value
  94.                   refers  to  the  corresponding  hardware  interrupt.  The
  95.                   value of this attribute is of the type ADDRESS defined in
  96.                   the package SYSTEM.  (See 13.7.2.)
  97.  
  98. P'AFT             For a prefix P that denotes a fixed point subtype:
  99.  
  100.                   Yields the number of  decimal  digits  needed  after  the
  101.                   point  to  accommodate  the  precision  of the subtype P,
  102.                   unless the delta of the subtype P is greater than 0.1, in
  103.                   which case the attribute yields the value one.  (P'AFT is
  104.                   the smallest positive integer N for which (10**N)*P'DELTA
  105.                   is greater than or equal to  one.)   The  value  of  this
  106.                   attribute   is   of  the  type  universal_integer.   (See
  107.                   3.5.10.)
  108.  
  109. P'BASE            For a prefix P that denotes a type or subtype:
  110.  
  111.                   This attribute denotes the base type of P.   It  is  only
  112.                   allowed  as  the prefix of the name of another attribute:
  113.                   for example, P'BASE'FIRST.  (See 3.3.3.)
  114.  
  115. P'CALLABLE        For a prefix P that is appropriate for a task type:
  116.  
  117.                   Yields the value FALSE when the execution of the  task  P
  118.                   is  either  completed  or terminated, or when the task is
  119.                   abnormal;  yields the value TRUE otherwise.  The value of
  120.                   this attribute is of the predefined type  BOOLEAN.   (See
  121.                   9.9.)
  122.  
  123. P'CONSTRAINED     For a prefix P that denotes an  object  of  a  type  with
  124.                   discriminants:
  125.  
  126.  
  127.  
  128.  
  129.                                    A - 1
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.                   Yields  the  value  TRUE  if  a  discriminant  constraint
  139.                   applies to the object P, or if the object is  a  constant
  140.                   (including a formal parameter or generic formal parameter
  141.                   of  mode in);  yields the value FALSE otherwise.  If P is
  142.                   a generic formal parameter of mode in out, or if P  is  a
  143.                   formal  parameter of mode in out or out and the type mark
  144.                   given  in  the  corresponding   parameter   specification
  145.                   denotes  an  unconstrained  type with discriminants, then
  146.                   the value of this attribute is obtained from that of  the
  147.                   corresponding   actual  parameter.   The  value  of  this
  148.                   attribute  is  of  the  predefined  type  BOOLEAN.   (See
  149.                   3.7.4.)
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                    A - 2
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204. P'CONSTRAINED     For a prefix P that denotes a private type or subtype:
  205.  
  206.                   Yields  the  value  FALSE  if  P denotes an unconstrained
  207.                   nonformal private type with discriminants;   also  yields
  208.                   the  value  FALSE  if  P denotes a generic formal private
  209.                   type and the  associated  actual  subtype  is  either  an
  210.                   unconstrained type with discriminants or an unconstrained
  211.                   array  type;  yields the value TRUE otherwise.  The value
  212.                   of this attribute is  of  the  predefined  type  BOOLEAN.
  213.                   (See 7.4.2.)
  214.                    1
  215.  
  216. P'COUNT           For a prefix P that denotes an entry of a task unit:
  217.  
  218.                   Yields  the number of entry calls presently queued on the
  219.                   entry (if the attribute is  evaluated  within  an  accept
  220.                   statement for the entry P, the count does not include the
  221.                   calling  task).   The  value  of this attribute is of the
  222.                   type universal_integer.  (See 9.9.)
  223.  
  224. P'DELTA           For a prefix P that denotes a fixed point  subtype:
  225.  
  226.                   Yields the value of the  delta  specified  in  the  fixed
  227.                   accuracy definition for the subtype P.  The value of this
  228.                   attribute  is  of the type universal_real.  (See 3.5.10.)
  229.  
  230. P'DIGITS          For a prefix P that denotes a floating point subtype:
  231.  
  232.                   Yields the  number  of  decimal  digits  in  the  decimal
  233.                   mantissa  of  model  numbers  of  the  subtype  P.  (This
  234.                   attribute yields the number D  of  section  3.5.7.)   The
  235.                   value of this attribute is of the type universal_integer.
  236.                   (See 3.5.8.)
  237.  
  238. P'EMAX            For a prefix P that denotes a floating point  subtype:
  239.  
  240.                   Yields the largest exponent value in the binary canonical
  241.                   form  of model numbers of the subtype P.  (This attribute
  242.                   yields the product 4*B of section 3.5.7.)  The  value  of
  243.                   this  attribute  is  of the type universal_integer.  (See
  244.                   3.5.8.)
  245.  
  246. P'EPSILON         For a prefix P that denotes a floating point subtype:
  247.  
  248.                   Yields the absolute value of the difference  between  the
  249.                   model number 1.0 and the next model number above, for the
  250.                   subtype  P.   The  value of this attribute is of the type
  251.                   universal_real.  (See 3.5.8.)
  252.  
  253. P'FIRST           For a prefix P that denotes a scalar type, or  a  subtype
  254.                   of a scalar type:
  255.  
  256.                   Yields the lower bound of P.  The value of this attribute
  257.                   has the same type as P.  (See 3.5.)
  258.  
  259.  
  260.  
  261.                                    A - 3
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270. P'FIRST           For a prefix P that is appropriate for an array type,  or
  271.                   that denotes a constrained array subtype:
  272.  
  273.                   Yields  the  lower  bound  of the first index range.  The
  274.                   value of this attribute has the same type as  this  lower
  275.                   bound.  (See 3.6.2 and 3.8.2.)
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                    A - 4
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336. P'FIRST(N)        For a prefix P that is appropriate for an array type,  or
  337.                   that denotes a constrained array subtype:
  338.  
  339.                   Yields  the  lower  bound  of  the N-th index range.  The
  340.                   value of this attribute has the same type as  this  lower
  341.                   bound.   The  argument  N  must be a static expression of
  342.                   type universal_integer.  The value of N must be  positive
  343.                   (nonzero)  and  no greater than the dimensionality of the
  344.                   array.  (See 3.6.2 and 3.8.2.)
  345.  
  346. P'FIRST_BIT       For a prefix P that  denotes  a  component  of  a  record
  347.                   object:
  348.  
  349.                   Yields  the  offset,  from  the start of the first of the
  350.                   storage units occupied by the component, of the first bit
  351.                   occupied by the component.  This offset  is  measured  in
  352.                   bits.   The  value  of  this  attribute  is  of  the type
  353.                   universal_integer.  (See 13.7.2.)
  354.  
  355.  
  356. P'FORE            For a prefix P that denotes a fixed point subtype:
  357.  
  358.                   Yields the minimum number of characters  needed  for  the
  359.                   integer  part  of the decimal representation of any value
  360.                   of the subtype P, assuming that the  representation  does
  361.                   not  include  an  exponent,  but includes a one-character
  362.                   prefix that is either a minus sign  or  a  space.   (This
  363.                   minimum  number  does  not  include  superfluous zeros or
  364.                   underlines, and is at least  two.)   The  value  of  this
  365.                   attribute   is   of  the  type  universal_integer.   (See
  366.                   3.5.10.)
  367.  
  368. P'IMAGE           For a prefix P that denotes a discrete type  or  subtype:
  369.  
  370.                   This  attribute  is  a  function with a single parameter.
  371.                   The actual parameter X must be a value of the  base  type
  372.                   of  P.   The  result  type is the predefined type STRING.
  373.                   The result is the image of the value of  X,  that  is,  a
  374.                   sequence  of characters representing the value in display
  375.                   form.  The image of an integer value is the corresponding
  376.                   decimal  literal;   without  underlines,  leading  zeros,
  377.                   exponent,  or  trailing spaces;  but with a one character
  378.                   prefix that is either a minus sign or a space.
  379.  
  380.                   The  image  of  an  enumeration  value  is   either   the
  381.                   corresponding   identifier   in   upper   case   or   the
  382.                   corresponding  character  literal  (including   the   two
  383.                   apostrophes);   neither  leading  nor trailing spaces are
  384.                   included.  The image of a character other than a  graphic
  385.                   character is implementation-defined.  (See 3.5.5.)
  386.  
  387. P'LARGE           For a prefix P that denotes a real subtype:
  388.  
  389.                   The attribute yields the largest positive model number of
  390.                   the  subtype  P.   The  value of this attribute is of the
  391.  
  392.  
  393.                                    A - 5
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.                   type universal_real.  (See 3.5.8 and 3.5.10.)
  403.  
  404. P'LAST            For a prefix P that denotes a scalar type, or  a  subtype
  405.                   of a scalar type:
  406.  
  407.                   Yields the upper bound of P.  The value of this attribute
  408.                   has the same type as P.  (See 3.5.)
  409.  
  410. P'LAST            For a prefix P that is appropriate for an array type,  or
  411.                   that denotes a constrained array subtype:
  412.  
  413.                   Yields  the  upper  bound  of the first index range.  The
  414.                   value of this attribute has the same type as  this  upper
  415.                   bound.  (See 3.6.2 and 3.8.2.)
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.                                    A - 6
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468. P'LAST(N)              For a prefix P that  is  appropriate  for  an  array
  469.                   type, or that denotes a constrained array subtype:
  470.  
  471.                   Yields  the  upper  bound  of  the N-th index range.  The
  472.                   value of this attribute has the same type as  this  upper
  473.                   bound.   The  argument  N  must be a static expression of
  474.                   type universal_integer.  The value of N must be  positive
  475.                   (nonzero)  and  no greater than the dimensionality of the
  476.                   array.  (See 3.6.2 and 3.8.2.)
  477.  
  478.  
  479.  
  480. P'LAST_BIT             For a prefix P that denotes a component of a  record
  481.                        object:
  482.  
  483.                        Yields  the  offset,  from the start of the first of
  484.                        the storage units occupied by the component, of  the
  485.                        last  bit occupied by the component.  This offset is
  486.                        measured in bits.  The value of this attribute is of
  487.                        the type universal_integer.  (See 13.7.2.)
  488.  
  489. P'LENGTH               For a prefix P that  is  appropriate  for  an  array
  490.                        type,  or  that denotes a constrained array subtype:
  491.  
  492.                        Yields the number of values of the first index range
  493.                        (zero  for  a  null  range).   The  value  of   this
  494.                        attribute  is  of  the type universal_integer.  (See
  495.                        3.6.2.)
  496.  
  497. P'LENGTH(N)            For a prefix P that  is  appropriate  for  an  array
  498.                        type,  or  that denotes a constrained array subtype:
  499.  
  500.                        Yields the number of values of the N-th index  range
  501.                        (zero   for  a  null  range).   The  value  of  this
  502.                        attribute is of  the  type  universal_integer.   The
  503.                        argument  N  must  be  a  static  expression of type
  504.                        universal_integer.  The value of N must be  positive
  505.                        (nonzero)  and no greater than the dimensionality of
  506.                        the array.  (See 3.6.2 and 3.8.2.)
  507.  
  508. P'MACHINE_EMAX         For a prefix P that denotes a floating point type or
  509.                        subtype:
  510.  
  511.                        Yields the largest value of exponent for the machine
  512.                        representation of the base type of P.  The value  of
  513.                        this  attribute  is  of  the type universal_integer.
  514.                        (See 13.7.3.)
  515.  
  516. P'MACHINE_EMIN         For a prefix P that denotes a floating point type or
  517.                        subtype:
  518.  
  519.                        Yields  the  smallest  (most  negative)   value   of
  520.                        exponent  for the machine representation of the base
  521.                        type of P.  The value of this attribute  is  of  the
  522.                        type universal_integer.  (See 13.7.3.)
  523.  
  524.  
  525.                                    A - 7
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534. P'MACHINE_MANTISSA     For a prefix P that denotes a floating point type or
  535.                        subtype:
  536.  
  537.                        Yields  the number of digits in the mantissa for the
  538.                        machine representation of the base type  of  P  (the
  539.                        digits  are  extended  digits  in  the  range  0  to
  540.                        P'MACHINE_RADIX - 1).  The value of  this  attribute
  541.                        is of the type universal_integer.  (See 13.7.3.)
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.                                    A - 8
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600. P'MACHINE_OVERFLOWS    For a prefix P that denotes a real type or  subtype:
  601.  
  602.                        Yields  the value TRUE if every predefined operation
  603.                        on values of the base type of P  either  provides  a
  604.                        correct    result,    or    raises   the   exception
  605.                        NUMERIC_ERROR in overflow  situations;   yields  the
  606.                        value  FALSE otherwise.  The value of this attribute
  607.                        is of the predefined type BOOLEAN.  (See 13.7.3.)
  608.  
  609. P'MACHINE_RADIX        For a prefix P that denotes a floating point type or
  610.                        subtype:
  611.  
  612.                        Yields the value of the radix used  by  the  machine
  613.                        representation  of the base type of P.  The value of
  614.                        this attribute is  of  the  type  universal_integer.
  615.                        (See 13.7.3.)
  616.  
  617.  
  618. P'MACHINE_ROUNDS       For a prefix P that denotes a real type or  subtype:
  619.  
  620.                        Yields the value TRUE if every predefined arithmetic
  621.                        operation  on  values  of  the base type of P either
  622.                        returns  an  exact  result  or  performs   rounding;
  623.                        yields the value FALSE otherwise.  The value of this
  624.                        attribute  is  of the predefined type BOOLEAN.  (See
  625.                        13.7.3.)
  626.  
  627. P'MANTISSA             For a prefix P that denotes a real subtype:
  628.  
  629.                        Yields the number of binary  digits  in  the  binary
  630.                        mantissa  of  model numbers of the subtype P.  (This
  631.                        attribute yields the number B of section 3.5.7 for a
  632.                        floating point type, or of section 3.5.9 for a fixed
  633.                        point type.)  The value of this attribute is of  the
  634.                        type universal_integer.  (See 3.5.8 and 3.5.10.)
  635.  
  636. P'POS                  For a prefix P  that  denotes  a  discrete  type  or
  637.                        subtype:
  638.  
  639.                        This   attribute   is   a  function  with  a  single
  640.                        parameter.  The actual parameter X must be  a  value
  641.                        of  the base type of P.  The result type is the type
  642.                        universal_integer.   The  result  is  the   position
  643.                        number  of  the value of the actual parameter.  (See
  644.                        3.5.5.)
  645.  
  646. P'POSITION             For a prefix P that denotes a component of a  record
  647.                        object:
  648.  
  649.                        Yields  the  offset,  from  the  start  of the first
  650.                        storage unit occupied by the record, of the first of
  651.                        the storage units occupied by the  component.   This
  652.                        offset  is  measured in storage units.  The value of
  653.                        this attribute is  of  the  type  universal_integer.
  654.                        (See 13.7.2.)
  655.  
  656.  
  657.                                    A - 9
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666. P'PRED                 For a prefix P  that  denotes  a  discrete  type  or
  667.                        subtype:
  668.  
  669.                        This   attribute   is   a  function  with  a  single
  670.                        parameter.  The actual parameter X must be  a  value
  671.                        of  the base type of P.  The result type is the base
  672.                        type of P.  The result is the value  whose  position
  673.                        number  is  one  less than that of X.  The exception
  674.                        CONSTRAINT_ERROR is raised if X equals P'BASE'FIRST.
  675.                        (See 3.5.5.)
  676.  
  677. P'RANGE                For a prefix P that  is  appropriate  for  an  array
  678.                        type,  or  that denotes a constrained array subtype:
  679.  
  680.                        Yields the first index range  of  P,  that  is,  the
  681.                        range P'FIRST .. P'LAST.  (See 3.6.2.)
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.                                   A - 10
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.      P'RANGE(N)        For a prefix P that  is  appropriate  for  an  array
  733.                        type,  or  that denotes a constrained array subtype:
  734.  
  735.                        Yields the N-th index range of P, that is, the range
  736.                        P'FIRST(N) .. P'LAST(N).  (See 3.6.2.)
  737.  
  738.      P'SAFE_EMAX       For a prefix P that denotes a floating point type or
  739.                        subtype:
  740.  
  741.                        Yields the largest  exponent  value  in  the  binary
  742.                        canonical  form  of safe numbers of the base type of
  743.                        P.  (This attribute yields the number E  of  section
  744.                        3.5.7.)   The value of this attribute is of the type
  745.                        universal_integer.  (See 3.5.8.)
  746.  
  747.  
  748.      P'SAFE_LARGE      For a prefix P that denotes a real type or  subtype:
  749.  
  750.                        Yields  the largest positive safe number of the base
  751.                        type of P.  The value of this attribute  is  of  the
  752.                        type universal_real.  (See 3.5.8 and 3.5.10.)
  753.  
  754.      P'SAFE_SMALL      For a prefix P that denotes a real type or  subtype:
  755.  
  756.                        Yields  the  smallest positive (nonzero) safe number
  757.                        of the base type of P.  The value of this  attribute
  758.                        is  of  the  type  universal_real.   (See  3.5.8 and
  759.                        3.5.10.)
  760.  
  761.      P'SIZE            For a prefix P that denotes an object:
  762.  
  763.                        Yields the number of  bits  allocated  to  hold  the
  764.                        object.   The value of this attribute is of the type
  765.                        universal_integer.  (See 13.7.2.)
  766.  
  767.      P'SIZE            For a prefix P that denotes any type or subtype:
  768.  
  769.                        Yields the minimum number of bits that is needed  by
  770.                        the  implementation  to  hold any possible object of
  771.                        the type or subtype P.  The value of this  attribute
  772.                        is of the type universal_integer.  (See 13.7.2.)
  773.  
  774.      P'SMALL           For a prefix P that denotes a real  subtype:
  775.  
  776.                        Yields  the smallest positive (nonzero) model number
  777.                        of the subtype P.  The value of this attribute is of
  778.                        the type universal_real.  (See 3.5.8 and 3.5.10.)
  779.  
  780.      P'STORAGE_SIZE    For a prefix  P  that  denotes  an  access  type  or
  781.                        subtype:
  782.  
  783.                        Yields  the  total  number of storage units reserved
  784.                        for the collection associated with the base type  of
  785.                        P.   The  value  of  this  attribute  is of the type
  786.                        universal_integer.  (See 13.7.2.)
  787.  
  788.  
  789.                                   A - 11
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.      P'STORAGE_SIZE    For a prefix P that denotes a task type  or  a  task
  799.                        object:
  800.  
  801.                        Yields the number of storage units reserved for each
  802.                        activation  of  a  task  of  the  type  P or for the
  803.                        activation of the task object P.  The value of  this
  804.                        attribute  is  of  the type universal_integer.  (See
  805.                        13.7.2.)
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.                                   A - 12
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.      P'SUCC            For a prefix P  that  denotes  a  discrete  type  or
  865.                        subtype:
  866.  
  867.                        This   attribute   is   a  function  with  a  single
  868.                        parameter.  The actual parameter X must be  a  value
  869.                        of  the base type of P.  The result type is the base
  870.                        type of P.  The result is the value  whose  position
  871.                        number    is  one  greater  than  that  of  X.   The
  872.                        exception CONSTRAINT_ERROR is  raised  if  X  equals
  873.                        P'BASE'LAST.  (See 3.5.5.)
  874.  
  875.      P'TERMINATED      For a prefix P that is appropriate for a task  type:
  876.  
  877.                        Yields  the  value TRUE if the task P is terminated;
  878.                        yields the value FALSE otherwise.  The value of this
  879.                        attribute is of the predefined type  BOOLEAN.   (See
  880.                        9.9.)
  881.  
  882.  
  883.      P'VAL             For a prefix P  that  denotes  a  discrete  type  or
  884.                        subtype:
  885.  
  886.                        This  attribute  is a special function with a single
  887.                        parameter X which can be of any integer  type.   The
  888.                        result  type  is  the base type of P.  The result is
  889.                        the   value   whose   position   number    is    the
  890.                        universal_integer  value  corresponding  to  X.  The
  891.                        exception  CONSTRAINT_ERROR   is   raised   if   the
  892.                        universal_integer value corresponding to X is not in
  893.                        the range P'POS(P'BASE'FIRST) .. P'POS(P'BASE'LAST).
  894.                        (See 3.5.5.)
  895.  
  896.      P'VALUE           For a prefix P  that  denotes  a  discrete  type  or
  897.                        subtype:
  898.  
  899.                        This   attribute   is   a  function  with  a  single
  900.                        parameter.  The actual parameter X must be  a  value
  901.                        of  the  predefined type STRING.  The result type is
  902.                        the base type of P.  Any leading  and  any  trailing
  903.                        spaces   of   the   sequence   of   characters  that
  904.                        corresponds to X  are ignored.
  905.  
  906.                        For  an  enumeration  type,  if  the   sequence   of
  907.                        characters  has the syntax of an enumeration literal
  908.                        and if this literal exists for the base type  of  P,
  909.                        the  result  is the corresponding enumeration value.
  910.                        For an integer type, if the sequence  of  characters
  911.                        has  the  syntax  of  an  integer  literal,  with an
  912.                        optional single leading character that is a plus  or
  913.                        minus sign, and if there is a corresponding value in
  914.                        the  base  type  of P, the result is this value.  In
  915.                        any other case, the  exception  CONSTRAINT_ERROR  is
  916.                        raised.  (See 3.5.5.)
  917.  
  918.  
  919.  
  920.  
  921.                                   A - 13
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.      P'WIDTH           For a prefix P that denotes a discrete  subtype:
  931.  
  932.                        Yields  the  maximum image length over all values of
  933.                        the  subtype  P  (the  image  is  the  sequence   of
  934.                        characters  returned  by  the attribute IMAGE).  The
  935.                        value   of   this   attribute   is   of   the   type
  936.                        universal_integer.  (See 3.5.5.)
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.                                   A - 14
  988.  
  989.  
  990.  
  991.  
  992.